package com.dao.library;

import java.util.ArrayList;

import com.bean.library.DbPaper;
import com.bean.library.Option;
import com.bean.library.Paper;
import com.bean.library.StatisticPaper;
import com.bean.library.Subject;
import com.bean.library.UserPaper;

public interface PaperDao {
	//获得空试卷
	public Paper getPaperByPaperId(int paperId) throws Exception;
	
	public Subject getSubjectBySubId(int subId);
	public Option getOptionByOptId(int optId);
	public boolean isOptinRight(int optId) throws Exception;
	public boolean insertPaper(DbPaper dbPaper) throws Exception;
	
	
	
	public int getCountOfProblem(String subjectId,int difficulty) throws Exception;//查出某一科目，某一难度的题目有多少个
	
	/*
	 * getPaperRandomly(Integer problemCountEachDifficulty[]);
	 * 参数说明：problemCountEachDifficulty[1]为难度为1的题目数目
	 *        problemCountEachDifficulty[2]为难度为2的题目数目
	 * 
	 * 
	 */
	
	public Paper getPaperRandomly(String subjectId,Integer problemCountEachDifficulty[]) throws Exception;//给出不同难度的题目数目，随机拼出一套试卷
	
	/*
	 * 
	 * public ArrayList<StatisticPaper>[] getStatisticPaper(String teacherId,String subjectId);
	 * 功能说明：通过teacherid和subjectId返回该老师所出试卷的统计信息
	 * 
	 * 返回值说明：
	 * ArrayList<StatisticPaper>[]为一个数组
	 * ArrayList<StatisticPaper>[0]为examPaper的list           考试试卷的list
	 * ArrayList<StatisticPaper>[1]为sparePaper的list          备用试卷的list
	 * ArrayList<StatisticPaper>[2]为practicePaper的list       模拟试卷的list
 	 * 
	 */
	public ArrayList<StatisticPaper>[] getStatisticPaper(String teacherId,String subjectId) throws Exception;
	
	//获得带有标准答案的试卷
	public UserPaper getStandadPaperById(int paperId);
	
	
}
